/**
 * Created by Wayne
 * vps Model
 */


const  mongoose = require('mongoose'),
      shortid = require('shortid'),
       Schema = mongoose.Schema;

let vpsSchema = new Schema({
  _id: {
    type: String,
    'default': shortid.generate
  },
  name:String,
  host:String,
  port:String,
  line:String,//IOS line,ANDROID line,PC line
  defer:String,
  status: String,//Alive ,
  type:String,//mtproto,socks5
  maxuser:String,//max user count
  tag:String,//mtproto tag
  secret:String,
  currentuser:String,//currentusercount
  register_time:{
    type: Date,
    "default": Date.now
  }
});

let vps = mongoose.model('vps', vpsSchema);

module.exports = vps;
